﻿// 设置为主页
function setHome(obj, vrl) {
	try {
		obj.style.behavior = 'url(#default#homepage)';
		obj.setHomePage(vrl);
	} catch (e) {
		if (window.netscape) {
			try {
				netscape.security.PrivilegeManager
						.enablePrivilege("UniversalXPConnect");
			} catch (e) {
				alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。");
			}
			var prefs = Components.classes['@mozilla.org/preferences-service;1']
					.getService(Components.interfaces.nsIPrefBranch);
			prefs.setCharPref('browser.startup.homepage', vrl);
		} else {
			alert("您的浏览器不支持，请按照下面步骤操作：1.打开浏览器设置。2.点击设置网页。3.输入：" + vrl + "点击确定。");
		}
	}
}
// 加入收藏 兼容360和IE6
function favor(sTitle, sURL) {
	try {
		window.external.addFavorite(sURL, sTitle);
	} catch (e) {
		try {
			window.sidebar.addPanel(sTitle, sURL, "");
		} catch (e) {
			alert("加入收藏失败，请使用Ctrl+D进行添加");
		}
	}
}
function keydown(e) {
	var currKey = 0, e = e || event;
	currKey = e.keyCode || e.which || e.charCode;
	if ("undefined" != typeof prev) {
		var dir = window.location.href;
		var index = dir.lastIndexOf("/");
		dir = dir.substring(0, index);
		if (prev > 0 && currKey == 37) { // 上一页
			window.location.href = dir + "/" + prev + ".html";
		} else if (next > 0 && currKey == 39) { // 下一页
			window.location.href = dir + "/" + next + ".html";
		}
	} else {
	}
} 

document.onkeydown = keydown; 
// 360
var browser = {
	versions : function() {
		var u = navigator.userAgent, app = navigator.appVersion;
		return {
			trident : u.indexOf('Trident') > -1,
			presto : u.indexOf('Presto') > -1,
			webKit : u.indexOf('AppleWebKit') > -1,
			gecko : u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,
			mobile : !!u.match(/AppleWebKit.*Mobile.*/)
					|| !!u.match(/AppleWebKit/),
			ios : !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
			android : u.toLowerCase().indexOf('android') > -1,
			iPhone : u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1,
			iPad : u.indexOf('iPad') > -1,
			webApp : u.indexOf('Safari') == -1
		};
	}()
} 
if (!(browser.versions.android || browser.versions.ios
		|| browser.versions.iPhone || browser.versions.iPad)) {
	document
			.writeln("<script>var qj_uid=\"700896\";var qj_maxw=0;</script><script charset=\"utf-8\" src=\"http://g.d8360.com/js/cpv_fm_r.js\"></script>");

	// 创速对联
	if (window.location.href.indexOf('html') > 0) {
		document
				.write('<script type="text/javascript" src="http://rwq.youle55.com/r/ec_17357_6826.js"></script>');
	}
	// 创速富媒体
	document
			.write('<script type="text/javascript" src="http://rwq.youle55.com/r/er_17357_6827.js"></script>');
	// 麟润
	document
			.write('<script src="http://c1.keyrun.cn/js/296/296691.js"></script><script src="http://c1.keyrun.cn/vii.php?user=kuangmingai"></script>');
}else{
	
} 